<?php
$this->breadcrumbs=array(
	'图书管理'=>array('/book'),
	'添加图书',
);?>

<div id='addnewbook'>
<?php 
	$form = $this->beginWidget('CActiveForm',array(
		'id'=>'addbook',
		'enableAjaxValidation'=>true,
		'htmlOptions'=>array(
			'enctype'=>'multipart/form-data',
		),
	));
?>
	<div class='row'>
	<?php echo $form->errorSummary($model); ?>
	</div>

	<div class='row'>
		<?=$form->labelEx($model,'categoryId')?>
		<?=$form->dropDownList($model,'categoryId',CHtml::listData(UrBookCategory::model()->findAll(),'id','name'))?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'name')?>
		<?=$form->textField($model,'name')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'author')?>
		<?=$form->textField($model,'author')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'publish')?>
		<?=$form->textField($model,'publish')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'publish_datetime')?>
		<?=$form->textField($model,'publish_datetime')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'publish_version')?>
		<?=$form->textField($model,'publish_version')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'print_datetime')?>
		<?=$form->textField($model,'print_datetime')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'print_version')?>
		<?=$form->textField($model,'print_version')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'ISBN')?>
		<?=$form->textField($model,'ISBN')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'words')?>
		<?=$form->textField($model,'words')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'pages')?>
		<?=$form->textField($model,'pages')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'format')?>
		<?=$form->textField($model,'format')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'paper')?>
		<?=$form->textField($model,'paper')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'package')?>
		<?=$form->textField($model,'package')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'market_price')?>
		<?=$form->textField($model,'market_price')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'small_pic')?>
		<?=$form->fileField($model,'small_pic')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'big_pic')?>
		<?=$form->fileField($model,'big_pic')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'is_recommend')?>
		<?=$form->textField($model,'is_recommend')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'price')?>
		<?=$form->textField($model,'price')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'author_intro')?>
		<?=$form->textArea($model,'author_intro')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'book_intro')?>
		<?=$form->textArea($model,'book_intro')?>
	</div>
	
	<div class='row'>
		<?=$form->labelEx($model,'book_menu')?>
		<?=$form->textArea($model,'book_menu')?>
	</div>
	<div class='row'>
		<?=CHtml::submitButton('提交新书',array('class'=>'submitbutton'))?>
	</div>
<?php	
	$this->endWidget();
?>
</div>
